const months = ['Jan', 'March', 'April', 'June'];
months.splice(1, 0, 'Feb');
// Inserts at index 1
console.log(months);
// Expected output: Array ["Jan", "Feb", "March", "April", "June"]

months.splice(4, 1, 'May');
// Replaces 1 element at index 4
console.log(months);
// Expected output: Array ["Jan", "Feb", "March", "April", "May"]

months.splice(3, 1);
console.log(months);

const goods = [
    { id: 250, name: "matebook x", price: 8999.00, amount: 2 },
    { id: 222, name: "xiaomi book", price: 6999.00, amount: 2 }
];

console.log(goods);
goods.splice(0, 1);
console.log(goods);
